package main

import (
	"fmt"
	"strconv"
	"time"
)

func main() {
	//content, err := ioutil.ReadFile("static/jsapi_ticket.txt")
	//if err != nil {
	//	fmt.Println(err)
	//}
	//fmt.Println(string(content))
	//fmt.Println(time.Now().Unix())
	//fmt.Println(lib.AcquireAccessToken())
	//token := "37_Ye8TmXyt5ELOaaF75PKfWQoNwj5QQrpxb5ftrY7z2yPMT2AzsctpWK5WipldIKz6dH0NBmbM_skmL3fvSa9cb7GSu2A1Gb7wr7hj3TrwcWsFBCZMrQwGSrJSAEaC0G_ikv09jKbCKcMpE4mcMNVjAIATUC"
	//token := "{\"expire_time\":1579428991,\"jsapi_ticket\":\"HoagFKDcsGMVCIY2vOjf9p6R9DVh-o5NkwUHh-1Z6Bum1DDc-J402lhSacPvqjr0rvqK0XAHoOETvHj3ydZGhQ\"}"
	//err := ioutil.WriteFile("static/jsapi_ticket.txt", []byte(token), os.FileMode(os.O_WRONLY))
	//if err != nil {
	//	log.Printf("write file error :%s", err.Error())
	//}
	//url := strings.Replace(conf.JsApiTicketUrl, "ACCESS_TOKEN", token, 1)
	//resp, _ := http.Get(url)
	//data , _ := ioutil.ReadAll(resp.Body)
	//fmt.Println(string(data))
	//ticketresp := "{\"errcode\":0,\"errmsg\":\"ok\",\"ticket\":\"sM4AOVdWfPE4DxkXGEs8VGIa1Qg4bT3du5CSkyFusHOddnooc8fuzcwLoREZJbPnghYuL3isfafrwkd1_4eWEw\",\"expires_in\":7200}\n"
	//{"expire_time":1579428991,"jsapi_ticket":"HoagFKDcsGMVCIY2vOjf9p6R9DVh-o5NkwUHh-1Z6Bum1DDc-J402lhSacPvqjr0rvqK0XAHoOETvHj3ydZGhQ"}

	//h := md5.New()
	//h.Write([]byte(token))
	//hex.EncodeToString(h.Sum(nil))

	timestamp := time.Now().Unix()
	//var b []byte
	timestampstr := string(strconv.Itoa(int(timestamp)))
	//timestampstr := string(strconv.AppendInt(b, t, 10))
	fmt.Println(timestampstr)


}


